/**
var urllib=require('urllib');
urllib.request('http://localhost:3000/fileupload/index', function(err, data, res) {
	console.log(err);
	console.log(data.toString().lenth);
});
**/
var http=require('http');
var agent = new http.Agent();
agent.maxSockets = 1000;
console.log(agent);
var options = {
  hostname: 'localhost',
  port: 80,
  path: '/',
  method: 'GET',
  agent:agent
};

var req = http.request(options, function(res) {
  console.log(options.agent);
  console.log('STATUS: ' + res.statusCode);
  console.log('HEADERS: ' + JSON.stringify(res.headers));
  res.setEncoding('utf8');
  res.on('data', function (chunk) {
    console.log('BODY: ' + chunk);
  });
});

req.on('error', function(e) {
  console.log('problem with request: ' + e.message);
});

// write data to request body

